﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:VisualStudioTempFileCleanup.ModelView" 
    x:Class="MainWindow"
    Title="MainWindow" Height="576" Width="362"
       AllowsTransparency="True" ResizeMode="NoResize"  WindowStyle="None" Background="Transparent" Icon="/Images/Clean.ico"
    DataContext="{DynamicResource Data}">
    <Window.Resources>
        <local:MainWindow x:Key="Data"></local:MainWindow>
        <Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="{x:Type Button}">
        				<Grid>
        					<Image Source="/Images/CloseButton.png"/>
        					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        				</Grid>
        				<ControlTemplate.Triggers>
        					<Trigger Property="IsFocused" Value="True"/>
        					<Trigger Property="IsDefaulted" Value="True"/>
        					<Trigger Property="IsMouseOver" Value="True"/>
        					<Trigger Property="IsPressed" Value="True"/>
        					<Trigger Property="IsEnabled" Value="False"/>
        				</ControlTemplate.Triggers>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
        <Style x:Key="ConfigureButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Image Source="/Images/configuration.png"/>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>

        <Image x:Name="Image1" Stretch="Fill" Source="/Images/Clean.png" />
        <Button Content="Delete Visual Studio Temp Files" Height="61" HorizontalAlignment="Left" Margin="79,148,0,0" x:Name="CleanButton" VerticalAlignment="Top" Width="188" Command="{Binding StartCommand}"/>
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="22,231,0,0" x:Name="Status" Text="{Binding StatusMessage}" VerticalAlignment="Top" Width="298" Background="Transparent" TextAlignment="Center" FontWeight="Bold" FontFamily="Lucida Console" />
<Button Content="Button" Height="21" Style="{DynamicResource CloseButtonStyle}" Width="21"  HorizontalAlignment="Right" VerticalAlignment="Top"  BorderBrush="Transparent" Background="Transparent" Command="{Binding CloseCommand}" RenderTransformOrigin="0.19,0.593"/>
        <GroupBox Header="Options" Margin="0,431,0,0">
            <DataGrid ItemsSource="{Binding Actions}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" Margin="0,0,0,-2">
            <DataGrid.Columns>
                <DataGridCheckBoxColumn Header="Is Enabled" Binding="{Binding IsEnabled}" ClipboardContentBinding="{x:Null}"/>
                <DataGridTextColumn Header="Action" Binding="{Binding Name, Mode=OneWay}" ClipboardContentBinding="{x:Null}"/>
            </DataGrid.Columns>


        </DataGrid></GroupBox>
        
    </Grid>
</Window>
